#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author   : BUZAI
# @Time     : 2021/7/7 21:46
from selenium.webdriver.common.by import By


class TxChannels():
    def __init__(self,driver):
        self.driver=driver

    def channels_editor(self):
        '''编辑'''
        self.driver.find_element(By.XPATH,'//android.widget.TextView[@resource-id="com.tencent.news:id/bic"]').click()
    def channels_complete(self):
        '''完成编辑'''
        self.driver.find_element(By.XPATH,'//android.widget.TextView[@resource-id="com.tencent.news:id/bic"]').click()
    def channels_picture(self):
        '''图片'''
        self.driver.find_element(By.XPATH,'//android.widget.TextView[@text="图片"]')
    def channels_hugh(self):
        '''体育'''
        self.driver.find_element(By.XPATH,'//android.widget.TextView[@text="体育"]')
    def channels_add_world(self):
        '''添加法观天下'''
        self.driver.find_element(By.XPATH,'//android.widget.LinearLayout[@resource-id=\"com.tencent.news:id/wl\"]/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.view.ViewGroup[1]/android.widget.RelativeLayout[3]/android.widget.TextView[1]').click()
